package com.seed.core.pojo;

import cn.dev33.satoken.stp.SaTokenInfo;

import java.util.List;
import java.util.Map;

public class Subject {
    private Account account;
    private String name;
    private String avatar;

    private SaTokenInfo tokenInfo;
    private Map<String, String> positions;
    private List<String> permissions;
    private List<String> fullPermissions; // 如果是内部用户，则是所有，即admin的权限，如果是租户用户，则是租户的权限

    public Subject(Account account) {
        this.account = account;
    }

    public Subject(Account account, String name) {
        this(account);
        this.name = name;
    }

    public Subject(Account account, String name, String avatar) {
        this(account, name);
        this.avatar = avatar;
    }

    public Account getAccount() {
        return account;
    }

    public Subject setAccount(Account account) {
        this.account = account;
        return this;
    }

    public String getName() {
        return name;
    }

    public Subject setName(String name) {
        this.name = name;
        return this;
    }

    public String getAvatar() {
        return avatar;
    }

    public Subject setAvatar(String avatar) {
        this.avatar = avatar;
        return this;
    }

    public SaTokenInfo getTokenInfo() {
        return tokenInfo;
    }

    public Subject setTokenInfo(SaTokenInfo tokenInfo) {
        this.tokenInfo = tokenInfo;
        return this;
    }

    public Map<String, String> getPositions() {
        return positions;
    }

    public Subject setPositions(Map<String, String> positions) {
        this.positions = positions;
        return this;
    }

    public List<String> getPermissions() {
        return permissions;
    }

    public Subject setPermissions(List<String> permissions) {
        this.permissions = permissions;
        return this;
    }

    public List<String> getFullPermissions() {
        return fullPermissions;
    }

    public Subject setFullPermissions(List<String> fullPermissions) {
        this.fullPermissions = fullPermissions;
        return this;
    }
}
